function ret=look(a,b,source,target)
index=find(a==source);
if ismember(b,target(index))
    ret=index(find(b==target(index)));
else
    index=find(a==target);
    ret=index(find(b==source(index)));
end